{% extends "../theme/bage.html" %}
{% block headinfo %}
<style type="text/css">
        table.diff {font-family:Courier; border:medium;width:99%;}
        .diff_header {background-color:#e0e0e0}
        td.diff_header {text-align:right}
        .diff_next {background-color:#c0c0c0}
        .diff_add {background-color:#aaffaa}
        .diff_chg {background-color:#ffff77}
        .diff_sub {background-color:#ffaaaa}
    </style>
{% end %}
{% block typebody %}
<ol class="breadcrumb">
    <li>{{ _('Current location') }}: <a href="{% module site_url() %}">{{ _('Home') }}</a></li>
    <li>{% module the_category(postinfo.uid) %}</li>
    <li class="active">{{ postinfo.title }}</li>
</ol>
<div class="panel panel-black">
    <div class="panel-heading">
        <h2>{{ postinfo.title }}</h2>
        <span>{{ str(postinfo.date)[:10] }}</span>

        <span>{{ _('Browse') }}: {{ postinfo.view_count }} </span>
        {% if userinfo and kwd.get('can_edit',False) %}
        {% if postinfo.kind == '1' %}
        <span class="cmts"><a href="/wiki/_edit/{{ postinfo.uid }}" class="btn btn-xs btn-primary">{{ _('Edit') }}</a></span>
        <span class="cmts"><a href="/wiki/{{ postinfo.title }}" class="btn btn-xs btn-primary">{{ _('View') }}</a></span>
        {% else %}
        <span class="cmts"><a href="/page/_edit/{{ postinfo.uid }}" class="btn btn-xs btn-primary">{{ _('Edit') }}</a></span>
        <span class="cmts"><a href="/page/{{ postinfo.title }}" class="btn btn-xs btn-primary">{{ _('View') }}</a></span>
        {% end %}
        {% end %}
    </div>
    <div class="panel-body">
        <div class="entry">
            <div class="entrycontent">
                {% if html_diff_arr %}
                {% for diff_dic in html_diff_arr %}
                {% if userinfo and kwd.get('can_review') %}
                <div class="bg-info">
                   <a href="/wiki_man/restore/{{ diff_dic['hist_uid'] }}" class="btn btn-sm btn-danger" title="Restore">
                        {{ _('Restore') }}
                    </a>
                    <a href="/wiki_man/delete/{{ diff_dic['hist_uid'] }}" class="btn btn-sm btn-danger" title="Delete">
                        {{ _('Delete') }}
                    </a>
                    <span style="color:#0000FF; padding:0 10px">
                        {{ _('Author') }}: {{ diff_dic['hist_user'] }}
                    </span>
                    <span style="color:#f00">
                        {{ _('Modify time') }} :  {{ datetime.datetime.fromtimestamp(diff_dic['hist_time']).strftime('%Y - %m - %d （%H : %M : %S）') }}&nbsp;

                    </span>
                    <span style="color:#0000FF">
                       {{ _('Updated number of words') }} :  {{ diff_dic['up_words_num'] }}&nbsp;
                    </span>
                </div>
                {% end %}
                {% raw (diff_dic['html_diff']) %}
                <p></p>
                {% end %}
                {% else %}
                {{ _('No modification record.') }}
                {% end %}

            </div>
        </div>
        <div class="postmeta">
            <div class="wpyouvote"></div>
            <div class="clear"></div>
            <br>
            <strong>{{ _('Article link') }}:</strong>
            {% if postinfo.kind == '1' %}
            <a href="/wiki/{{postinfo.title}}" class="underline"> {{ postinfo.title }}</a>
            {% else %}
            <a href="/page/{{postinfo.title}}" class="underline"> {{ postinfo.title }}</a>
            {% end %}
            <br/>

        </div>
    </div>
</div>
{% end %}


